package com.djc.service.UserServiceImpl;

import com.djc.dao.UserDao;
import com.djc.pojo.user;
import com.djc.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserDao dao;
    @Override
    public List<user> query(String name) {
        return dao.query(name);

    }

    @Override
    public void add(user user) {
        dao.add(user);
    }

    @Override
    public void delete(Integer id) {
        dao.delete(id);
    }

    @Override
    public user edit(Integer id) {
        return dao.edit(id);
    }

    @Override
    public void update(user user) {
        dao.update(user);
    }

    @Override
    public user login(String name, String password) {
        return dao.login(name,password);
    }
}
